local sock = ngx.socket.udp()
sock:settimeout(6000)
local ok, err = sock:setpeername('0.0.0.0', '11153')
if not ok then
    ngx.log(ngx.ERR, 'connect failed:', err)
    return
end

local bytes, err = sock:send('helsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslohelsssssssssssssssssslo')
if not bytes then
    ngx.log(ngx.ERR, 'send failed:', err)
    return
end

ngx.log(ngx.INFO, 'http send bytes:', bytes)

local res
local index = 0
while index < 5 do
    local rec, err = sock:receive()
    if not rec then
        ngx.log(ngx.ERR, 'receive failed:', err)
    else
        res = rec
        ngx.log(ngx.INFO, 'receive rec:', rec)
        sock:close()
        break;
    end
    index = index + 1
    if index == 5 then
        sock:close()
    end
end


return '123'